#include "orangepch.h"
#include "VertexArray.h"
#include "Platform/OpenGl/OpenGlVertexArray.h"
#include "Renderer.h"

namespace Orange {
	VertexArray::~VertexArray()
	{
	}
	Ref<VertexArray> VertexArray::Create()
	{
		switch (Renderer::GetAPI())
		{
		case RendererAPI::API::None: ORANGE_CORE_ASSERT(false, " RenderApi is not support! "); return nullptr;
		case RendererAPI::API::OpenGl: return std::make_shared<OpenGlVertexArray>();
		}

		ORANGE_CORE_ASSERT(false, " RenderApi unknown! ")
		return nullptr;

	}

}
